#include <boost/ptr_container/ptr_vector.hpp>

class Object
{
public:
	explicit Object(int id) : m_id(id) { std::cout << "Object " << m_id << std::endl; }
	~Object() { std::cout << "~Object " << m_id << std::endl; }
private:
	int m_id;
};

int main()
{
	boost::ptr_vector<Object> v;
	v.push_back(new Object(1));
	v.push_back(new Object(2));
}